<?php
if ($this->Session->flash()):
?>
<div class="alert alert-warning">
	<?php  echo $this->Session->flash();?>
</div>
<?php
endif;
echo $this->Form->create('Product', array('action' => 'createProduct', 'type' => 'file'));
?>
<div class="row">
	<div class="col-lg-12">
		<h2 class="page-header">Thêm mới sản phẩm</h2>
	</div>
</div>
<div class="row">
	<table class="table table-striped table-bordered table-hover" id="dataTables-example">
		<tbody>
			<tr>
				<th width="15%">Tên sản phẩm <span class="require">*</span></th>
				<td>
				<?php
				echo $this->Form->input('pro_name', array(
						'type' => 'text',
						'label' => false,
						'class' => 'form-control w400',
						'required' => true,
						'id'=>'pro_name',
						'value'=>'',
						'placeholder' =>('Tên sản phẩm')
				));
				?>
				</td>
			</tr>
			<tr>
				<th>Giá sản phẩm</th>
				<td>
				<?php
				echo $this->Form->input('pro_price', array(
						'type' => 'text',
						'label' => false,
						'class' => 'form-control w200',
						'required' => false,
						'id'=>'pro_price',
						'value'=>'',
						'placeholder' =>('Giá sản phẩm')
				));
				?>
				</td>
			</tr>
			<tr>
				<th>Loại sản phẩm</th>
				<td>
					<?php
					$options = array('0' => 'Cũ ', '1' => 'Mới');
					$attributes = array('legend' => false, 'value' => '');
					echo $this->Form->radio('pro_new', $options, $attributes);
					?>
				</td>
			</tr>
			<tr>
				<th>Ảnh sản phẩm</th>
				<td>
					<?php
					echo $this->Form->file('file][',
						array('type' => 'file',
						'id'=>'file',
						'class'=>'file',
						'subImage'=>'',
					));
					?>
				</td>
			</tr>
			<tr>
				<th>Miêu tả</th>
				<td>
					<?php
						echo $this->Form->textarea('pro_teaser', array(
							'label' => false,
							'class' => 'ckeditor',
							'required' => false,
							'rows'=>4,
							'value'=>'',
						));
					?>
				</td>
			</tr>
			<tr>
				<th>Captcha</th>
				<td>
					<!-- captcha追加部 -->
					<?php //echo $this->Captcha->input();?>
				</td>
			</tr>
			<tr>
				<th></th>
				<td colspan="2" align="center">
					<?php
					echo $this->Form->input('pro_date', array(
							'type' => 'hidden',
							'value'=>time(),
					));

					echo $this->Form->button('Submit', array(
						'type' => 'submit',
						'class' => 'btn btn-primary',
						'label' => false,
						'div' => false,
					)
					).'  ';

					echo $this->Form->button('Reset', array(
							'type' => 'reset',
							'class' => 'btn btn-primary',
							'label' => false,
							'div' => false,
						)
					);
					?>
				</td>
			</tr>
		</tbody>
	</table>
</div>

<?php echo $this->Form->end()?>